/*Copyright 2010 by Matt Van Der Westhuizen */

package org.chaoticengine.ast;

import java.util.HashMap;
import java.util.Iterator;
import org.chaoticengine.ast.model.TradeGood;
import org.chaoticengine.ast.model.TradeGoodFactory;
import org.chaoticengine.ast.model.TradeInventory;

/**
 * Use to test XML serialization / deserialization.
 *
 * @author Matt Van Der Westhuizen <mattpwest@gmail.com>
 */
public class TestXML {
    public static void main(String args[]) {
        /*
        String filename = "data/Food.xml";
        Serializer srl = new Persister();
        File source = new File(filename);
        TradeGood tg = null;
        try {
            tg = srl.read(TradeGoodImplementation.class, source);
        } catch (Exception ex) {
            System.out.println("Warning: Failed to load TradeGoods for TradeGoodFactory from file '" + filename + "'.");
            ex.printStackTrace();
            return;
        }

        if (tg != null) {
            System.out.println("TradeGood: " + tg);
        }
         *
         */

        /*
        HashMap<String, TradeGood> goods = TradeGoodFactory.getInstance().getGoods();
        Iterator<String> keyIt = goods.keySet().iterator();

        while (keyIt.hasNext()) {
            TradeGood tg = goods.get(keyIt.next());
            System.out.println("TradeGood: " + tg);
        }
         * 
         */

        TradeInventory ti = TradeInventory.create();
        
    }
}
